<!DOCTYPE html>
<html>
<head>
<title>用户列表</title> <@h.head />
<script type="text/javascript" src="${path}/static/plugins/lhgdialog/lhgdialog.min.js"></script>
<style type="text/css">
body {
	padding-bottom: 40px;
}
.table td {
    vertical-align: middle;
}

@media ( max-width : 980px) {
	.navbar-text.pull-right {
		float: none;
		padding-left: 5px;
		padding-right: 5px;
	}
}
</style>
</head>
<body>
	<form class="form-inline definewidth m20" action="${path}/web/appuser/list" method="post" id="listForm">
		手机号： <input name="phone" id="phone" class="abc input-default" placeholder="设备号"
			value="${(RequestParameters['phone'])!''}">
		&nbsp;&nbsp;
		用户名： <input name="username" id="username" class="abc input-default" placeholder="用户名"
			value="${(RequestParameters['username'])!''}">
		&nbsp;&nbsp;
		用户类型：
		<select id="role" name="role" class="span1">
			<option value="">全部</option>
			<option value="1">线路供应商</option>
			<option value="2">摄影大师</option>
			<option value="3">商家及俱乐部</option>
			<option value="4">普通用户</option>
		</select>
		&nbsp;&nbsp;
		<button type="submit" class="btn btn-primary">查询</button>
	</form>
	<!-- 
	<div class="definewidth m20">
		<a class="btn btn-default" href="javascript: openAdd();"><i class="fa fa-plus fa-lg"></i> 新增</a>
		<a class="btn btn-default" href="javascript: deleteData();"><i class="fa fa-times fa-lg"></i> 删除</a>
	</div>
	 -->
	 
	<table class="table table-bordered table-hover definewidth m10">
		<thead>
			<tr>
				<th onclick="checkAll();"><input type="checkbox" id="checkAll">全选</th>
				<th>头像</th>
				<th>用户名</th>
				<th>昵称</th>
				<th>手机号</th>
				<th>邮箱</th>
				<th>角色</th>
				<th>标签</th>
				<th>注册日期</th>
				<th>状态</th>
			</tr>
		</thead>
		<tbody name="tablebody">
			<#list list as u>
			<tr>
				<td width="5%"><input type="checkbox" name="checkbox" value="${(u.id)!''}"></td>
				<td width="6%"><img src="${(u.logo)!''}" style="height:50px;"></td>
				<td>${(u.username)!""}</td>
				<td>${(u.nickname)!""}</td>
				<td>${(u.phone)!""}</td>
				<td>${(u.email)!""}</td>
				<td>
					<#if u.role=='1'>线路供应商
					<#elseif u.role=='2'>摄影大师
					<#elseif u.role=='3'>商家及俱乐部
					<#elseif u.role=='4'>普通用户
					</#if>
				</td>
				<td>${(u.tag)!""}</td>
				<td>${(u.cdate?string("yyyy-MM-dd"))!""}</td>
				<td>
					<#if u.status=='Y'>有效
					<#elseif u.status=='N'>无效
					</#if>
				</td>
			</tr>
			</#list>
		</tbody>
	</table>
	<#if (list?size > 0)>
		<@h.page />
	</#if>
	
	<@h.foot />
	<script type="text/javascript">
	
		$("#role").val(${(user.role)!''});
		
		function checkAll() {
			if ($("#checkAll").attr("checked") == "checked")
				$("[name='checkbox']").attr("checked", 'true');//全选
			else
				$("[name='checkbox']").removeAttr("checked");//取消全选
		}

	</script>
</body>
</html>
